import Base from '@/services/base'

export default class service extends Base {
    constructor(param){
        //执行父类构造器(添加prop属性)
        super(param);
        this.path = '/api/home'
    }
    /*
    首页头面板(新增)
    /api/home/headpanel
    */
    async headpanel({longitude,latitude}){
        return await this.fly.get(`/api/home/headpanel?longitude=${longitude}&latitude=${latitude}`);
    }

    /*
    面板详情(新的)
    api/home/panelDetail
    */
   async panelDetail({code,roleType}){
    return await this.fly.get(`api/home/panelDetail?code=${code}&roleType=${roleType}`)
   }
   /*
   获取练习
   /api/home/getHomePractice
   */
  async getExamByCode({code}){
    return await this.fly.get(`/api/home/getHomePractice?code=${code}`)
  }

  //重置自主练习
  async redoSelf(param){
	  return await this.fly.post('/api/home/redoSelf',param);
  }
  async redoSelfSub(param){
  	  return await this.fly.post('/api/home/redoSelfSub',param);
  }
  //goSelfExamSub
  
  async getSecondExam({knowledgeId}){
	  return await this.fly.get(`/api/home/selfExamSub?knowledgeId=${knowledgeId}`);
  }
}
